import { TYConfig } from "./Common/EntityBase";

//let host = "https://www.e-taiyun.cn";
let app = "MiniShops/";
let host = "http://192.168.31.46:10107";

export var ConfigInit = () => {
    TYConfig.TYLogin = `${host}/${app}TYLogin`;
    TYConfig.QueryAllFAQ = `${host}/${app}QueryAllFAQ`;
    TYConfig.GetOpenId = `${host}/${app}GetOpenId`;
    TYConfig.QueryIsAgree = `${host}/${app}QueryIsAgree`;
    TYConfig.QueryAllAD = `${host}/${app}QueryAllAd`;
    TYConfig.UserLogin = `${host}/${app}UserLogin`;
    TYConfig.QueryMiniProgram = `${host}/${app}QueryMiniProgram`;
    TYConfig.QueryMiniProgramCount = `${host}/${app}QueryMiniProgramCount`;
    TYConfig.GetShareInfo = `${host}/${app}GetShareInfo`;
    TYConfig.AddTRecommend = `${host}/${app}AddTRecommend`;
    TYConfig.QueryAllMessage = `${host}/${app}QueryAllMessage`;
    TYConfig.QueryNoReadMessageCount = `${host}/${app}QueryNoReadMessageCount`;
    TYConfig.AgreeAgreement = `${host}/${app}AgreeAgreement`;
    TYConfig.ReceiveVip = `${host}/${app}ReceiveVip`;
};

export let Config = {
    //登录
    TYLogin: `${host}/${app}TYLogin`,
    //获取OpenID
    GetOpenId: `${host}/${app}GetOpenId`,
    //查询店铺首页数据
    QueryStoreIndex: `${host}/${app}QueryStoreIndex`, //商品详情
    QueryGoodsDetails: `${host}/${app}QueryGoodsDetails`, //今日特卖
    QuerySaleToDay: `${host}/${app}QuerySaleToDay`, //查询全部类目
    QueryCategory: `${host}/${app}QueryCategory`, //按分类查询全部商品
    QueryAllGoods: `${host}/${app}QueryAllGoods`,
    //我的太云币
    QueryMemberTyCurrency: `${host}/${app}QueryMemberTyCurrency`, //我的优惠券
    QueryMemberCoupon: `${host}/${app}QueryMemberCoupon`, //查询收货地址
    QueryMemberAddress: `${host}/${app}QueryMemberAddress`, //添加收货地址
    AddMemberAddress: `${host}/${app}AddMemberAddress`, //编辑收货地址
    EditUserAddress: `${host}/${app}EditUserAddress`, //删除收货地址
    DeleteUserAddress: `${host}/${app}DeleteUserAddress`, //修改默认收货地址
    UpdateDefaultAddress: `${host}/${app}UpdateDefaultAddress`,
    //订单列表
    QueryMemberOrderList: `${host}/${app}QueryMemberOrderList`, //订单详情
    QueryOrderDetails: `${host}/${app}QueryOrderDetails`, //直接下单
    QueryConfirmOrderData: `${host}/${app}QueryConfirmOrderData`, //购物车下单
    QueryConfirmOrderDataByCart: `${host}/${app}QueryConfirmOrderDataByCart`, //购物车商品数量
    QueryCartCount: `${host}/${app}QueryCartCount`, //修改购物车商品数量
    UpdateCartCount: `${host}/${app}UpdateCartCount`, //修改购物车选中状态
    UpdateCartSelectState: `${host}/${app}UpdateCartSelectState`, //修改可购商品全选全不选
    UpdateCartSelectAll: `${host}/${app}UpdateCartSelectAll`, //购物车列表
    QueryUserCart: `${host}/${app}QueryUserCart`, //添加到购物车
    AddToCart: `${host}/${app}AddToCart`, //删除购物车商品
    DeleteCart: `${host}/${app}DeleteCart`, //清空失效购物车
    DeleteCartList: `${host}/${app}DeleteCartList`, //批量删除购物车商品

    QuerySelectedUserCart: `${host}/${app}QuerySelectedUserCart` //获取选中的购物车商品
};

// QueryShopInfo: `${host}/${app}QueryShopInfo`,
// QueryHotProducts: `${host}/${app}QueryHotProducts`,
// QueryNewProducts: `${host}/${app}QueryNewProducts`,
// QueryShoppingCart: `${host}/${app}QueryShoppingCart`,
// QueryProduct: `${host}/${app}QueryProduct`,
// AddShoppingCart: `${host}/${app}AddShoppingCart`,
// EditShoppingCart: `${host}/${app}EditShoppingCart`,
// DeleteShoppingCart: `${host}/${app}DeleteShoppingCart`
